/* ExcelInSubToDB.java
 *
 * Project/Product: GW
 *
 * Modify Information:
 * =============================================================================
 *   Author	Date       Description
 *   ----------	---------- ---------------------------------------------------
 *   Administrator	2008-2-22	First release
 *
 * Licensed Materials - Property of APEP
 * =============================================================================
 *    (C) COPYRIGHT Shanghai Auto Mart E-Procurement Co., Ltd. 2007 - 2008
 *    All Rights Reserved.
 *
 *    This software is the confidential and proprietary information of
 *    Shanghai Auto Mart E-Procurement Co., Ltd. ("Confidential Information").
 *    You shall not disclose such Confidential Information and shall use it only
 *    in accordance with the terms of the license agreement you entered into 
 *    with Shanghai Auto Mart E-Procurement Co., Ltd.
 *
 * Noties:
 * =============================================================================
 * 
 */

package system.imp;
import java.io.DataInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.text.DecimalFormat;
import java.util.ArrayList;

import org.apache.poi.hssf.usermodel.HSSFCell;
import org.apache.poi.hssf.usermodel.HSSFRow;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;

import system.base.InSub;
import system.base.InSub;
import system.base.ServerDownupfileInfo;
import system.base.WarehouseCategory;
import framework.core.Conditions;
import framework.core.ConstDefine;
import framework.core.DBConnection;
import framework.core.ILoginContext;
import framework.core.LogWriter;
import framework.core.ObjectList;

public class ExcelInSubToDB implements GWBaseProcesser{
    //public static String doSaveToDB(DataInputStream aFile,)
    //public static String doSaveToDB(DataInputStream aFile, DBConnection con, ILoginContext loginContext, String tableName, String warehouseCode,String upDownType)
  // public static String  doSaveToDB(DataInputStream aFile,DBConnection con,String tableName,String warehouseCode,ILoginContext loginContext,String upDownType)
    public static String doSaveToDB(DataInputStream aFile, DBConnection con, ILoginContext loginContext, String tableName, String warehouseCode,String upDownType)
    throws GWException

 {
 int tSuccCount = 0;
 int tFailCount = 0;
 String tFailFile = "0";
 HSSFWorkbook tHSSFWorkbook = new HSSFWorkbook();
 //开始读取excel文件
 HSSFSheet tHSSFSheet = null;
 try {
    tHSSFWorkbook = new HSSFWorkbook(aFile);
    tHSSFSheet = tHSSFWorkbook.getSheet(tableName);
 } catch (IOException e) {
    e.getStackTrace();
    new Exception("批量下载文件失败");
 }
 ArrayList alist = new ArrayList();
 ArrayList tsucceslist = new ArrayList();
 ArrayList tErrList = new ArrayList();

 //读取并检查Excel明细
 int tRowCount = parseExcelInSub(alist, tHSSFSheet, loginContext);
 if (alist.size() > 0) {
    // 保存上传文件到数据库
    for (int i = 0; i < alist.size(); i++) {
        try {
            GWManufactureUploadVO gwManufactureUpload = (GWManufactureUploadVO) alist.get(i);

            InSub is = gwManufactureUpload.getInSub();

            // 判断数据库中是否存在该条记录
            // 根据仓库编码和分类编码得到是否在数据库中存在该条信息
            /*
             * Conditions cs = new Conditions();
             * cs.add(WarehouseCategory.WAREHOUSE_CODE,wc.getWarehouseCode());
             * cs.add(WarehouseCategory.CATEGORY_CODE,wc.getCategoryCode());
             * WarehouseCategory warehouseCategory =
             * WarehouseCategory.fetch(con,cs);
             */

            InSub InSub = is.fetch(con, is.getId());
            if (InSub == null) {
                // 数据库中不存在的操作:得到ID = GUID值
                InSub = InSub.fetch();
            }

            // 更新当前一条Excel信息数据库
            InSub.setInBillId(is.getInBillId());
            InSub.setPositionCode(is.getPositionCode());
            InSub.setPositionName(is.getPositionName());
            InSub.setProductId(is.getProductId());
            InSub.setProductCode(is.getProductCode());
            InSub.setProductName(is.getProductName());
            InSub.setProductPrice(is.getProductPrice());
            InSub.setProductCount(is.getProductCount());
            InSub.setProductMoney(is.getProductMoney());
            InSub.setKeeperStaffId(is.getKeeperStaffId());
            InSub.setKeeperStaffCode(is.getKeeperStaffCode());
            InSub.setKeeperStaffName(is.getKeeperStaffName());
            InSub.setBalanceMode(is.getBalanceMode());
            InSub.setOutProductCount(is.getOutProductCount());
            InSub.setStatus(is.getStatus());
            InSub.setCreateUserId(is.getCreateUserId());
            InSub.setCreateUser(is.getCreateUser());
            InSub.setCreateTime(is.getCreateTime());
            InSub.setLastUpdateUserId(is.getLastUpdateUserId());
            InSub.setLastUpdateUser(is.getLastUpdateUser());
            InSub.setLastUpdateTime(is.getLastUpdateTime());
            InSub.setIsSync(is.getIsSync());
            InSub.save(con);
            tSuccCount++;
        } catch (Exception e) {
            System.out.println(e.getMessage());
            tFailCount++;
        }
    }
                
    // 在循环结束后在客户上传下载表中记录操作信息
    try {
        ServerDownupfileInfo serverDownupfileInfo = new ServerDownupfileInfo();
        ServerDownupfileInfo sdfi = ServerDownupfileInfo.fetch();
        sdfi.setCreateTime(new framework.core.DateUtil().getFullString());
        sdfi.setCreateUser(ConstDefine.EXCELFILE_CREATE_USER_AUTO);
        sdfi.setCreateUserId(ConstDefine.EXCELFILE_CREATE_USER_ID_AUTO);
        sdfi.setDownloadtyp(upDownType);
        sdfi.setLastUpdateTime(new framework.core.DateUtil().getDateString());
        sdfi.setLastUpdateUser(loginContext.getLoginUserName());
        sdfi.setLastUpdateUserId(loginContext.getLoginUserId());
        sdfi.setParmsstr(tableName);
        sdfi.setDatatableName(tableName);
        sdfi.setParmstype(ServerDownupfileInfo.UPLOAD_PARMSTYPE_TEXT);
        sdfi.setStatus(ConstDefine.STR_YES);
        sdfi.setUpdownState(ServerDownupfileInfo.UPLOAD_STATE_SUCCESS);
        sdfi.setWarehouseUincode(warehouseCode);
        sdfi.save(con);
    } catch (Exception e) {
        System.out.println(e.getMessage());    
    }

 }
 //读取sheet表单
 return tSuccCount + "-" + tFailCount + "-" + tRowCount;
 }

 //end chengbiao.he

 /* start chengbiao.he */
 //解析Excel文件
 private static int parseExcelInSub(ArrayList aList, HSSFSheet aHSSFSheet, ILoginContext loginContext) throws GWException {
 int i = 0;
 //取得第一行的对象
 HSSFRow tFirstRow = aHSSFSheet.getRow(0);

 DecimalFormat a = new DecimalFormat("#");
 while (true) {
    HSSFRow tHSSFRow = aHSSFSheet.getRow(1 + i);
    boolean flag = false;
    try {

        for (int j = 0; j < 25; j++) {
            if (tHSSFRow == null) {
                break;
            }
            if (tHSSFRow.getCell((short) j) == null) {
                break;
            }
            flag = true;
            break;
        }
        if (!flag) {
            break;
        } else {
            GWManufactureUploadVO tGSManufactureUploadVO = new GWManufactureUploadVO();
            int tResult = 1;
            String tFailReason = "";

            InSub is = new InSub();

            for (int j = 0; j <25; j++) {
                // 获得EXCEL首行记录
                String tFiledName = tFirstRow.getCell((short) j).getStringCellValue();
                // 序号
                if (tFiledName.equalsIgnoreCase(InSub.ID)) {
                    String tID = PoiUtil.getCellValue(tHSSFRow, j, "");// String.valueOf(tHSSFRow.getCell((short)j).getStringCellValue());
                    is.setId(tID);
                }
                // 入库单ID
                else if (tFiledName.equalsIgnoreCase(InSub.IN_BILL_ID)) {
                    String tInBillId = PoiUtil.getCellValue(tHSSFRow, j, ""); // tHSSFRow.getCell((short)j).getStringCellValue().trim();
                    is.setInBillId(tInBillId);
                }
                // 货位编码
                else if (tFiledName.equalsIgnoreCase(InSub.POSITION_CODE)) {
                    String tPositionCode = PoiUtil.getCellValue(tHSSFRow, j, ""); // tHSSFRow.getCell((short)j).getStringCellValue().trim();
                    is.setPositionCode(tPositionCode);
                }
                // 货位名称
                else if (tFiledName.equalsIgnoreCase(InSub.POSITION_NAME)) {
                    //int tWarehouseName = tHSSFRow.getCell((short)j).getCellType();
                    String tPositionName = PoiUtil.getCellValue(tHSSFRow, j, "");
                    is.setPositionName(tPositionName);

                }
                // 产品ID
                else if (tFiledName.equalsIgnoreCase(InSub.PRODUCT_ID)) {
                    String tProductId = PoiUtil.getCellValue(tHSSFRow, j, "");// String.valueOf(tHSSFRow.getCell((short)j).getStringCellValue());
                    is.setProductId(tProductId);
                }
                // 产品编码
                else if (tFiledName.equalsIgnoreCase(InSub.PRODUCT_CODE)) {
                    String tProductCode = PoiUtil.getCellValue(tHSSFRow, j, "");// tHSSFRow.getCell((short)j).getStringCellValue().trim();
                    is.setProductCode(tProductCode);

                }
                // 产品名称
                else if (tFiledName.equalsIgnoreCase(InSub.PRODUCT_NAME)) {
                    String tProductName = PoiUtil.getCellValue(tHSSFRow, j, ""); // tHSSFRow.getCell((short)j).getStringCellValue();
                    is.setProductName(tProductName);
                }

                // 产品价格
                else if (tFiledName.equalsIgnoreCase(InSub.PRODUCT_PRICE)) {
                   // String tProductPrice = PoiUtil.getCellValue(tHSSFRow, j, "");// String.valueOf(tHSSFRow.getCell((short)j).getNumericCellValue());
                    double tProductPrice = tHSSFRow.getCell((short)j).getNumericCellValue();
                    is.setProductPrice(tProductPrice);
                }
                // 入库数量
                else if (tFiledName.equalsIgnoreCase(InSub.PRODUCT_COUNT)) {
                    //String tProductCount = PoiUtil.getCellValue(tHSSFRow, j, "");// tHSSFRow.getCell((short)j).getStringCellValue();
                    double tProductCount = tHSSFRow.getCell((short)j).getNumericCellValue();
                    is.setProductCount(tProductCount);
                }
                // 产品金额
                else if (tFiledName.equalsIgnoreCase(InSub.PRODUCT_MONEY)) {
                   // String tProductMoney = PoiUtil.getCellValue(tHSSFRow, j, "");// tHSSFRow.getCell((short)j).getStringCellValue();
                    double tProductMoney = tHSSFRow.getCell((short)j).getNumericCellValue();
                    is.setProductMoney(tProductMoney);
                }
                // 保管员序号
                else if (tFiledName.equalsIgnoreCase(InSub.KEEPER_STAFF_ID)) {
                    String tKeeperStaffId = PoiUtil.getCellValue(tHSSFRow, j, ""); // tHSSFRow.getCell((short)j).getStringCellValue().trim();
                   // int tKeeperStaffId = tHSSFRow.getCell((short)j).getCellType();
                    is.setKeeperStaffId(tKeeperStaffId);
                }
                // 保管员编码
                else if (tFiledName.equalsIgnoreCase(InSub.KEEPER_STAFF_CODE)) {
                    String tKeeperStaffCode = PoiUtil.getCellValue(tHSSFRow, j, "");// tHSSFRow.getCell((short)j).getStringCellValue();
                    is.setKeeperStaffCode(tKeeperStaffCode);
                }
                // 保管员姓名
                if (tFiledName.equalsIgnoreCase(InSub.KEEPER_STAFF_NAME)) {
                    String tKeeperStaffName = PoiUtil.getCellValue(tHSSFRow, j, "");// String.valueOf(tHSSFRow.getCell((short)j).getStringCellValue());
                    is.setKeeperStaffName(tKeeperStaffName);
                }
                // 结算模式
                else if (tFiledName.equalsIgnoreCase(InSub.BALANCE_MODE)) {
                    String tBalanceMode = PoiUtil.getCellValue(tHSSFRow, j, ""); // tHSSFRow.getCell((short)j).getStringCellValue().trim();
                    is.setBalanceMode(tBalanceMode);
                }
                // 已出库数量
                else if (tFiledName.equalsIgnoreCase(InSub.OUT_PRODUCT_COUNT)) {
                    //String tOutProductCount = PoiUtil.getCellValue(tHSSFRow, j, ""); // tHSSFRow.getCell((short)j).getStringCellValue().trim();
                    double tOutProductCount = tHSSFRow.getCell((short)j).getNumericCellValue();
                    is.setOutProductCount(tOutProductCount);
                }
                // 是否有效
                else if (tFiledName.equalsIgnoreCase(InSub.STATUS)) {
                    //int tBalanceUser = tHSSFRow.getCell((short)j).getCellType();
                    String tStatus = PoiUtil.getCellValue(tHSSFRow, j, "");
                    is.setStatus(tStatus);

                }
               
                // 创建用户ID
                else if (tFiledName.equalsIgnoreCase(InSub.CREATE_USER_ID)) {
                    String tCreateUserId = PoiUtil.getCellValue(tHSSFRow, j, ""); // tHSSFRow.getCell((short)j).getStringCellValue();
                    is.setCreateUserId(tCreateUserId);
                }

                // 创建用户
                else if (tFiledName.equalsIgnoreCase(InSub.CREATE_USER)) {
                    String tCreateUser = PoiUtil.getCellValue(tHSSFRow, j, "");// String.valueOf(tHSSFRow.getCell((short)j).getNumericCellValue());
                    is.setCreateUser(tCreateUser);
                }
                // 单证创建时间
                else if (tFiledName.equalsIgnoreCase(InSub.CREATE_TIME)) {
                    String tCreateTime = PoiUtil.getCellValue(tHSSFRow, j, "");// tHSSFRow.getCell((short)j).getStringCellValue();
                    is.setCreateTime(tCreateTime);
                }
                // 最后修改人序号
                else if (tFiledName.equalsIgnoreCase(InSub.LAST_UPDATE_USER_ID)) {
                    String tLastUpdateUserId = PoiUtil.getCellValue(tHSSFRow, j, "");// tHSSFRow.getCell((short)j).getStringCellValue();
                    is.setLastUpdateUserId(tLastUpdateUserId);
                }
                // 最后修改人
                else if (tFiledName.equalsIgnoreCase(InSub.LAST_UPDATE_USER)) {
                    String tLastUpdateUser = PoiUtil.getCellValue(tHSSFRow, j, ""); // tHSSFRow.getCell((short)j).getStringCellValue().trim();
                    is.setLastUpdateUser(tLastUpdateUser);
                }
                // 最后修改时间
                else if (tFiledName.equalsIgnoreCase(InSub.LAST_UPDATE_TIME)) {
                    String tLastUpdateTime = PoiUtil.getCellValue(tHSSFRow, j, "");// tHSSFRow.getCell((short)j).getStringCellValue();
                    is.setLastUpdateTime(tLastUpdateTime);
                }
             // 是否已同步
                else if (tFiledName.equalsIgnoreCase(InSub.IS_SYNC)) {
                    String IsSync = PoiUtil.getCellValue(tHSSFRow, j, "");// tHSSFRow.getCell((short)j).getStringCellValue();
                    is.setIsSync(IsSync);
                }
                

            }
            tGSManufactureUploadVO.setInSub(is);
            // tGSManufactureUploadVO.setFailure_reason(tFailReason);
            tGSManufactureUploadVO.setInsert_result(String.valueOf(tResult));
            tGSManufactureUploadVO.setRowNumber(i + 1);
            aList.add(tGSManufactureUploadVO);
            i++;
        }
    } catch (RuntimeException e) {
        LogWriter.error("****Manufacture BatchImport RuntimeEx :[" + e.getMessage() + "]");
        throw new GWException("导入数据中某一列数据类型不符合规定.");
    } catch (Error e) {
        LogWriter.error("****Manufacture BatchImport ErroeEx :[" + e.getMessage() + "]");
        throw new GWException(e.getMessage());
    } catch (Exception e) {
        LogWriter.error("****Manufacture BatchImport Ex :[" + e.getMessage() + "]");
        throw new GWException(e.getMessage());
    }
 }
 return i ;
 }

 //根据参数创建要下载的Excel文件
 /**
 * return 创建文件的路径
 * 创建失败返回 "Error"
 */
 /*
 public static String createExcelByDownLoadInSub(DBConnection con,String serverPath,String tableName,String warehouseCode,String type,String lastupdatetime)
 {
 String strFilePath = "";
 try{
    //根据参数查询数据
    Conditions cs = new Conditions();
    if (type.equals(ConstDefine.EXCELFILE_LOAD_TYPE_TIME))
    {
        String strDate = framework.core.DateUtil.formatToLongDateString(lastupdatetime, new framework.core.DateUtil().getFullString());
        cs.add(WarehouseCategory.LAST_UPDATE_TIME +">= ?",Conditions.CUSTOM,strDate);
    }
    ObjectList list = InSub.fetch().search(con, cs);            
    
    //Excel生成文件保存到指定位置
    try{    
        HSSFWorkbook tWb = new HSSFWorkbook();
        HSSFSheet tSheet = tWb.createSheet(tableName);
        HSSFRow tRow = null;
   
        //表头行
        tRow = tSheet.createRow((short)0);

        HSSFCell c1 = PoiUtil.createCell(tWb,tRow,(short)0,InSub.ID);
        HSSFCell c2 = PoiUtil.createCell(tWb,tRow,(short)1,InSub.IN_BILL_CODE);
        HSSFCell c3 = PoiUtil.createCell(tWb,tRow,(short)2,InSub.WAREHOUSE_CODE);
        HSSFCell c4 = PoiUtil.createCell(tWb,tRow,(short)3,InSub.WAREHOUSE_NAME);
        HSSFCell c5 = PoiUtil.createCell(tWb,tRow,(short)4,InSub.PROVIDER_CODE);
        HSSFCell c6 = PoiUtil.createCell(tWb,tRow,(short)5,InSub.PROVIDER_NAME);
        HSSFCell c7 = PoiUtil.createCell(tWb,tRow,(short)6,InSub.OTHER_WAREHOUSE_CODE);
        HSSFCell c8 = PoiUtil.createCell(tWb,tRow,(short)7,InSub.OTHER_WAREHOUSE_NAME);
        HSSFCell c9 = PoiUtil.createCell(tWb,tRow,(short)8,InSub.CREATE_TIME);
        HSSFCell c10 = PoiUtil.createCell(tWb,tRow,(short)9,InSub.IN_TYPE);
        HSSFCell c11 = PoiUtil.createCell(tWb,tRow,(short)10,InSub.IN_MONEY);
        HSSFCell c12 = PoiUtil.createCell(tWb,tRow,(short)11,InSub.SEND_BILL_CODE);
        HSSFCell c13 = PoiUtil.createCell(tWb,tRow,(short)12,InSub.REMARK);
        HSSFCell c14 = PoiUtil.createCell(tWb,tRow,(short)13,InSub.BALANCE_FLAG);
        HSSFCell c15 = PoiUtil.createCell(tWb,tRow,(short)14,InSub.BALANCE_USER_ID);
        HSSFCell c16 = PoiUtil.createCell(tWb,tRow,(short)15,InSub.BALANCE_USER);
        HSSFCell c17 = PoiUtil.createCell(tWb,tRow,(short)16,InSub.BALANCE_TIME);
        HSSFCell c18= PoiUtil.createCell(tWb,tRow,(short)17,InSub.STATUS);
        HSSFCell c19 = PoiUtil.createCell(tWb,tRow,(short)18,InSub.CREATE_USER_ID);
        HSSFCell c20 = PoiUtil.createCell(tWb,tRow,(short)19,InSub.CREATE_USER);
        HSSFCell c21 = PoiUtil.createCell(tWb,tRow,(short)20,InSub.CREATE_TIME);
        HSSFCell c22 = PoiUtil.createCell(tWb,tRow,(short)21,InSub.LAST_UPDATE_USER_ID);
        HSSFCell c23 = PoiUtil.createCell(tWb,tRow,(short)22,InSub.LAST_UPDATE_USER);
        HSSFCell c24 = PoiUtil.createCell(tWb,tRow,(short)23,InSub.LAST_UPDATE_TIME);
        HSSFCell c25 = PoiUtil.createCell(tWb,tRow,(short)24,InSub.IS_SYNC);

        short index = 0 ; //当前所在行号          
        short index_b = 3;
        for(int i=0;i<list.size();i++){
            InSub is = (InSub)list.get(i);    
  
            //创建一行
            tRow = tSheet.createRow((short)(index+1));
            
            PoiUtil.createCell(tWb,tRow,(short)0,is.getId() + "");
            PoiUtil.createCell(tWb,tRow,(short)1,is.getInBillCode() + "");
            PoiUtil.createCell(tWb,tRow,(short)2,is.getWarehouseCode() + "");
            PoiUtil.createCell(tWb,tRow,(short)3,is.getWarehouseName() + "");
            PoiUtil.createCell(tWb,tRow,(short)4,is.getProviderCode() + "");
            PoiUtil.createCell(tWb,tRow,(short)5,is.getProviderName() + "");
            PoiUtil.createCell(tWb,tRow,(short)6,is.getOtherWarehouseCode() + "");
            PoiUtil.createCell(tWb,tRow,(short)7,is.getWarehouseName() + "");
            PoiUtil.createCell(tWb,tRow,(short)8,is.getInTime() + "");
            PoiUtil.createCell(tWb,tRow,(short)9,is.getInType() + "");
            PoiUtil.createCell(tWb,tRow,(short)10,is.getInMoney() + "");
            PoiUtil.createCell(tWb,tRow,(short)11,is.getSendBillCode() + "");
            PoiUtil.createCell(tWb,tRow,(short)12,is.getRemark() + "");
            PoiUtil.createCell(tWb,tRow,(short)13,is.getBalanceFlag() + "");
            PoiUtil.createCell(tWb,tRow,(short)14,is.getBalanceUserId() + "");
            PoiUtil.createCell(tWb,tRow,(short)15,is.getBalanceUser() + "");
            PoiUtil.createCell(tWb,tRow,(short)16,is.getBalanceTime() + "");
            PoiUtil.createCell(tWb,tRow,(short)17,is.getStatus() + "");
            PoiUtil.createCell(tWb,tRow,(short)18,is.getCreateUserId() + "");
            PoiUtil.createCell(tWb,tRow,(short)19,is.getCreateUser() + "");
            PoiUtil.createCell(tWb,tRow,(short)20,is.getCreateTime() + "");
            PoiUtil.createCell(tWb,tRow,(short)21,is.getLastUpdateUserId() + "");
            PoiUtil.createCell(tWb,tRow,(short)22,is.getLastUpdateUser() + "");
            PoiUtil.createCell(tWb,tRow,(short)23,is.getLastUpdateTime() + "");
            PoiUtil.createCell(tWb,tRow,(short)24,is.getIsSync() + "");


            index++;
        }
        String strTime = "";
        try{
            strTime = system.imp.DateUtil.getCurrTime();
        }
        catch(Exception e)
        {
        }
        
        String fileName;
        String filePath = serverPath + ConstDefine.EXCELFILE_SAVECREATEFILE_PATH;
        fileName ="download_" + strTime + "_" + tableName + ".xls";
        FileOutputStream fileOut = new FileOutputStream(filePath+fileName);
        tWb.write(fileOut);
        
        //返回下载路径
        strFilePath = ConstDefine.EXCELFILE_DOWNLOADCREATEFILE_PATH + fileName;
        
    }catch(Exception ex){
        strFilePath = ConstDefine.EXCELFILE_CREATE_ERROR;
    }
    
 }
 catch(Exception e)
 {
    strFilePath = ConstDefine.EXCELFILE_CREATE_ERROR;
 }

 return strFilePath;
 } 
 */

}
/* ExcleInSubToDB.java
*
* Project/Product: GW
*
* Modify Information:
* =============================================================================
*   Author Date       Description
*   ---------- ---------- ---------------------------------------------------
*   Administrator  2008-2-22   First release
*
* Licensed Materials - Property of APEP
* =============================================================================
*    (C) COPYRIGHT Shanghai Auto Mart E-Procurement Co., Ltd. 2007 - 2008
*    All Rights Reserved.
*
*    This software is the confidential and proprietary information of
*    Shanghai Auto Mart E-Procurement Co., Ltd. ("Confidential Information").
*    You shall not disclose such Confidential Information and shall use it only
*    in accordance with the terms of the license agreement you entered into 
*    with Shanghai Auto Mart E-Procurement Co., Ltd.
*
* Noties:
* =============================================================================
* 
*/


